<?php

class ecTemplateJavascript{
  
  public static function getJavascripts($viewParams = array(), $params)
  {
    $js = "";
    $md5= "";

    foreach($viewParams as $key => $values)
      if($key == 'js')
        foreach($values as $value)
        {
          $md5 = md5_file(dirname(__FILE__).'/../../../'.$params['dir_web'].'/javascript/'.$value);
          $js .= ecTemplateHelpers::javascript_include_tag('/javascript/'.$value.'?v='.$md5);
        }

    return $js;
  }
  
}

?>
